<?php include('scripts.php'); ?>
<script type="text/javascript" language="javascript">
$(function() {
    $("#passwordForm").validate({
        messages : {
            newPassword2: {
                equalTo: "Please enter the same password as above"
            }
        },
        rules : {
            "oldPassword" : {
                required : true,
                minlength : 3
            },
            "newPassword" : {
                required : true,
                minlength : 3
            },
            "newPassword2" : {
                required : true,
                minlength : 3,
                equalTo: "#newPassword"
            }
        },
        submitHandler: function(form) {
            waiting();
            form.submit();
        }
    });
});
</script>

<form action="/member/loginPassword" id="passwordForm" method="post">
<div style="padding: 10px; top: 30px; width: 98%">
<div class="portlet">
    <div class="portlet-header"><?php echo __('Change Password') ?></div>
    <div class="portlet-content">
<table cellpadding="0" cellspacing="5" align="center" border="0">
    <tr>
        <td colspan=2 align='center'>
        <?php if ($sf_flash->has('successMsg')): ?>
            <div class="ui-widget">
                <div style="margin-top: 20px; padding: 0 .7em;" class="ui-state-highlight ui-corner-all">
                    <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-info"></span>
                    <strong><?php echo $sf_flash->get('successMsg') ?></strong></p>
                </div>
            </div>
        <?php endif; ?>
        <?php if ($sf_flash->has('errorMsg')): ?>
            <div class="ui-widget">
                <div style="margin-top: 20px; padding: 0 .7em;" class="ui-state-error ui-corner-all">
                    <p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span>
                    <strong><?php echo $sf_flash->get('errorMsg') ?></strong></p>
                </div>
            </div>
        <?php endif; ?>
        </td>
    </tr>
    <tr>
        <td>
			<strong><?php echo __('Old Login Password'); ?></strong>
		</td>
		<td>
			<input name="oldPassword" type="password" id="oldPassword" tabindex="1" />
		</td>
    </tr>
    <tr>
        <td>
			<strong><?php echo __('New Login Password'); ?></strong>
		</td>
		<td>
			<input name="newPassword" type="password" id="newPassword" tabindex="2" />
		</td>
    </tr>
    <tr>
        <td>
			<strong><?php echo __('Re-enter Login Password'); ?></strong>
		</td>
		<td>
			<input name="newPassword2" type="password" id="newPassword2" tabindex="3" />
		</td>
    </tr>
    <!--<tr>
    	<td colspan=2 align='center'>
    	<?php /*if ($sf_flash->has('errorMsg')): */?>
			<span style="font-weight: bold;; color: #ff0000;"><?php /*echo $sf_flash->get('errorMsg') */?></span>
		<?php /*endif; */?>
		<?php /*if ($sf_flash->has('successMsg')): */?>
			<span style="font-weight: bold;; color: #000088;"><?php /*echo $sf_flash->get('successMsg') */?></span>
		<?php /*endif; */?>
    	</td>
    </tr>-->
    <tr>
        <td colspan=2 align='center'>
			<input type="submit" name="Button1" value="<?php echo __('Change Password') ?>" language="javascript" id="btnPassword" tabindex="4"/>
            <div id="ValidationSummary1" style="color:Red;width:200px;display:none;">
            </div>
		</td>
    </tr>
</table>
    </div>
    </div>
</div>
</form>